<html lang="{{lang|default('en')}}">
{% import 'languages/'+lang|default('en')+'.html' as lang %}
{% for p in page %}
    <head>
        <title>{{p.name}}</title>
        <meta charset="UTF-8">
		<meta http-equiv="Cache-Control" content="no-cache, no-store, must-revalidate" />
		<meta http-equiv="Pragma" content="no-cache" />
		<meta http-equiv="Expires" content="0" />
        <link rel="icon" type="image/png" href="{{ url_for('static', filename='images/favicon/favicon.ico') }}" />
		<link rel="apple-touch-icon" sizes="57x57" href="{{ url_for('static', filename='images/favicon/apple-icon-57x57.png') }}">
		<link rel="apple-touch-icon" sizes="60x60" href="{{ url_for('static', filename='images/favicon/apple-icon-60x60.png') }}">
		<link rel="apple-touch-icon" sizes="72x72" href="{{ url_for('static', filename='images/favicon/apple-icon-72x72.png') }}">
		<link rel="apple-touch-icon" sizes="76x76" href="{{ url_for('static', filename='images/favicon/apple-icon-76x76.png') }}">
		<link rel="apple-touch-icon" sizes="114x114" href="{{ url_for('static', filename='images/favicon/apple-icon-114x114.png') }}">
		<link rel="apple-touch-icon" sizes="120x120" href="{{ url_for('static', filename='images/favicon/apple-icon-120x120.png') }}">
		<link rel="apple-touch-icon" sizes="144x144" href="{{ url_for('static', filename='images/favicon/apple-icon-144x144.png') }}">
		<link rel="apple-touch-icon" sizes="152x152" href="{{ url_for('static', filename='images/favicon/apple-icon-152x152.png') }}">
		<link rel="apple-touch-icon" sizes="180x180" href="{{ url_for('static', filename='images/favicon/apple-icon-180x180.png') }}">
		<link rel="icon" type="image/png" sizes="192x192"  href="{{ url_for('static', filename='images/favicon/android-icon-192x192.png') }}">
		<link rel="icon" type="image/png" sizes="32x32" href="{{ url_for('static', filename='images/favicon/favicon-32x32.png') }}">
		<link rel="icon" type="image/png" sizes="96x96" href="{{ url_for('static', filename='images/favicon/favicon-96x96.png') }}">
		<link rel="icon" type="image/png" sizes="16x16" href="{{ url_for('static', filename='images/favicon/favicon-16x16.png') }}">
		<meta name="msapplication-TileColor" content="#ffffff">
		<meta name="msapplication-TileImage" content="{{ url_for('static', filename='images/favicon/ms-icon-144x144.png') }}">
		<meta name="theme-color" content="#ffffff">
        <script src="https://use.fontawesome.com/releases/v5.15.4/js/all.js" data-auto-replace-svg="nest"></script>
        <link href="{{ url_for('static', filename='css/jquery-ui.min.css') }}" rel="stylesheet">
		<link href="{{ url_for('static', filename='css/jquery-ui.structure.min.css') }}" rel="stylesheet">
        <link href="{{ url_for('static', filename='css/style-6.3.9.css') }}" rel="stylesheet">
        <link href="{{ url_for('static', filename='css/smon.css') }}" rel="stylesheet">
        <script src="/inc/jquery-3.6.0.min.js"></script>
		<script src="/inc/jquery-ui.min.js"></script>
        <script src="/app/static/js/smon.js"></script>
        <link href="{{ url_for('static', filename='css/toastr-6.3.9.css') }}" rel="stylesheet"/>
		<script src="/app/static/js/toastr.js"></script>
    </head>
    <body>
        <h2>Status page - {{p.name|replace("'", "")}}</h2>
        <h3>{{p.desc|replace("'", "")}}</h3>
        <div id="page_status" class="page_cur_status"></div>
        {% for check, value in checks_status.items() %}
        {% if value.uptime|int() > 50 and value.uptime|int() < 90  %}
            {% set add_class = 'serverWarn' %}
        {% elif value.en|int() == 0 %}
            {% set add_class = 'serverNone' %}
        {% elif value.uptime|int() < 50  %}
            {% set add_class = 'serverDown' %}
        {% else %}
            {% set add_class = 'serverUP' %}
        {% endif %}
        <div class="check_div" title="{{value.desc}}">
            <div>
                <span class="{{add_class}} check_uptime">{{value.uptime}}%</span>
                <span class="check_name">{{value.name|replace("'", "")}}</span>
            </div>
            <div class="history_statuses" id="history-{{check}}"></div>
            <div class="tooltip check_tooltip">Group: {{value.group}}, check type: {{value.check_type}}</div>
            <div class="tooltip check_tooltip check_last_check">last check</div>
        </div>
        <script>show_smon_history_statuses('{{check}}', '#history-{{check}}');</script>
        {% endfor %}
        <script>smon_status_page_avg_status('{{p.id}}');</script>
    </body>
</html>
{% endfor %}
